import Vue from "vue"
import Router from "vue-router"
import Home from "@/page/Home"
import PressureData from "@/page/PressureData"
import PipelineBurstData from "@/page/PipelineBurstData"
import WarningManager from "@/page/WarningManager"
import PressureMonitor from "@/page/pressureMonitor"
// import OverView from "@/page/OverView"
import Mointor from "@/components/monitor"
import SysConfiguration from "@/page/SysConfiguration/index"
import PipeData from "@/components/pipeData"
import NewsManager from '@/page/sysConfiguration/NewsManager'
import AuthoritionsManager from '@/page/sysConfiguration/AuthoritionsManager'
import DevicesManager from '@/page/sysConfiguration/DevicesManager'
import MaintenancesManager from '@/page/sysConfiguration/MaintenancesManager'
import MenusManager from '@/page/sysConfiguration/MenusManager'
// import NewsManager from '@/page/sysConfiguration/NewsManager'
import PipesManager from '@/page/sysConfiguration/PipesManager'
import UsersManager from '@/page/sysConfiguration/UsersManager'
import WaterusersManager from '@/page/sysConfiguration/WaterusersManager'
Vue.use(Router)

export default new Router({
	// mode: "history", // 访问路径不带井号 需要使用 history模式，才能使用 scrollBehavior
	routes: [
	{
		path: "/",
		redirect:"/home"
	},
	{
		path: "/home",
		name: "Home",
		component: Home,
		children:[
		{
			path:"/",
			redirect:"/overView"
		},
		{
			path:"/overView",
			name:"overView",
			component:()=> import ('@/page/overView/index')
		},
		{
			path: "/pressureMonitor",
			name: "pressureMonitor",
			component: PressureMonitor
		},
		{
			path: "/pressureData",
			name: "pressureData",
			component: PressureData,
		},
		{
			path: "/pipelineBurstData",
			name: "PipelineBurstData",
			component: PipelineBurstData,
		},
		{
			path: "/warningManager",
			name: "WarningManager",
			component: WarningManager,
		},
		{
			path: "/mointor",
			name: "Mointor",
			component: Mointor,
		},
		{
			path:"/pipeData",
			name: "PipeData",
			component: PipeData,
		},
		{
			path: "/sysConfiguration",
			name: "sysConfiguration",
			component: SysConfiguration,
			children:[
				{
					path:"/sysConfiguration",
					redirect:"/news"
				},
				{
					path:'/news',
					name:'news',
					component:NewsManager
				},
				{
					path:'/waterusers',
					name:'waterusers',
					component:WaterusersManager
				},
				{
					path:'/devices',
					name:'devices',
					component:DevicesManager
				},
				{
					path:'/pipes',
					name:'pipes',
					component:PipesManager
				},
				{
					path:'/maintenances',
					name:'maintenances',
					component:MaintenancesManager
				},
				{
					path:'/users',
					name:'users',
					component:UsersManager
				},
				{
					path:'/authoritions',
					name:'authoritions',
					component:AuthoritionsManager
				},
				{
					path:'/menus',
					name:MenusManager.name,
					component:MenusManager
				},
                {
                    path:'/modelParams',
                    name:'modelParams',
                    component:()=>import('@/page/sysConfiguration/ModelParamsManager.vue')
                }
			]
		},
		{
			path:"/lossControl",
			name:"lossControl",
			component:()=> import('@/page/lossControl/index.vue')
		},
        {
			path:"/flows",
			name:"flows",
			component:()=> import('@/page/lossControl/flows.vue')
		},
        {
            path:'/prodtctMarktingPoor',
            name:'prodtctMarktingPoor',
            component:()=> import('@/page/lossControl/ProductMarktingPoor.vue')
        },
        {
            path:'/yejianzuixiaoliuliang',
            name:'yejianzuixiaoliuliang',
            component:()=> import('@/page/lossControl/Yejianzuixiaoliuliang.vue')
        },
        {
            path:'/lossForecast',
            name:'lossForecast',
            component:()=> import('@/page/lossControl/LossForecast.vue')
        },
        {
            path:'/lossAnalyse',
            name:'lossAnalyse',
            component:()=> import('@/page/lossControl/LossAnalyse.vue')
        }
		]
	}

	]
})
